<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>dom demo01</title>
</head>
<body>
<button id="btn1">1</button>
<button id="btn2">2</button>
<img id='img' title="a" src="https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1906469856,4113625838&fm=26&gp=0.jpg">

<script>
    
    var btn1=document.getElementById('btn1');
    var btn2=document.getElementById('btn2');
    var img = document.getElementById('img')
    btn1.onclick = function(){
        img.src='https://dss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=2534506313,1688529724&fm=26&gp=0.jpg'
    }

</script>
</body>